package com.csp.mingyue.oss.runner;

import com.csp.mingyue.oss.service.SysOssConfigService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * 初始化 OSS 模块对应业务数据
 *
 * @author njy
 * @date 2023/9/12 10:08
 */
@Slf4j
@Component
@RequiredArgsConstructor
public class OssApplicationRunner implements ApplicationRunner {

	private final SysOssConfigService sysOssConfigService;

	@Override
	public void run(ApplicationArguments args) {
		sysOssConfigService.init();
		log.info("初始化 OSS 配置成功");
	}

}
